package com.doit.day01;

import redis.clients.jedis.Jedis;

import java.util.Random;

public class ConsumerDemo {
    public static void main(String[] args) throws InterruptedException {
        Jedis jedis = new Jedis("linux01", 6379);

        Random random = new Random();

        while (true){
            //将生产者里面的任务从最右边拿出来，然后插入到缓存的最左边
            jedis.rpoplpush("producer","cache");
            Thread.sleep(1500);
        }


    }
}
